<div class="row">
  <ul class="nav nav-pills">
    <li>
      <a href="<?php echo $this->createUrl('list') ?>">管理</a>
    </li>
    <li class="active"><a href="#">添加</a></li>
  </ul>
</div>
<div class="row">
	<?php $form=$this->beginWidget('CActiveForm', 
      array("id"=>'userform',
      'enableClientValidation'=>true,
      'clientOptions'=>array(
        'validateOnSubmit'=>true,
      ),
      "htmlOptions"=>array(
          "class"=>"form-horizontal")
    )); ?>

         <p class="lead text-center">添加用户</p>
       
        <?php 
        $success =yii::app()->user->getFlash('success');
        if (isset($success)) { ?>
        <div class="alert alert-success">
          <?php echo $success ?>
        </div>
       <?php } ?>
      <?php echo $form->errorSummary($model,null,null,array("class"=>'alert alert-error')); ?>
    <div class="control-group">
	    <label class="control-label">用户名:</label>
	    <div class="controls">
	     <?php echo  $form->textField($model,"username") ?>
        <?php $form->error($model,'username'); ?>
	    </div>
    </div>

    <div class="control-group">
      <label class="control-label">姓名:</label>
      <div class="controls">
        <?php echo  $form->textField($model,"truename") ?>
       <?php $form->error($model,'username'); ?>
      </div>
    </div>

    <div class="control-group">
      <label class="control-label">密码:</label>
      <div class="controls">
        <?php echo  $form->passwordField($model,"password") ?>
       <?php $form->error($model,'password'); ?>
      </div>
    </div>

    <div class="control-group">
      <label class="control-label">Email:</label>
      <div class="controls">
        <?php echo  $form->textField($model,"email") ?>
        <?php $form->error($model,'email'); ?>
      </div>
    </div>

    <div class="control-group">
          <div class="controls">
            <?php echo CHtml::submitButton('确定',array("class"=>'btn')); ?>
          </div>
    </div>
    <?php $this->endWidget(); ?>
</div>